//
//  ShareBackView.swift
//  TianTianBiTing
//
//  Created by Gox mac 2 on 2019/3/4.
//  Copyright © 2019 Gox_WallyDiao. All rights reserved.
//

import UIKit

class ShareBackView: UIView {
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        self.backgroundColor = UIColor.clear
        setUI()
        
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    func setUI() {
        self.backgroundColor = RGB_Same(0, 0.8)
        
        let backImageView = UIImageView.init(frame: FRAME_CGFloat(SCREEN_WIDTH / 2 - 161.5, 64, 323, 419))
        self.addSubview(backImageView)
        backImageView.isUserInteractionEnabled = true
        backImageView.image = IMAGE(name: "shareBack")
        
        let button = UIButton(type: UIButton.ButtonType.custom)
        button.frame = FRAME_CGFloat(SCREEN_WIDTH / 2 - 10, 548, 20, 20)
        button.setImage(IMAGE(name: "signRed_close"), for: .normal)
        button.titleLabel?.font = UIFont.boldSystemFont(ofSize: 19)
        button.addTarget(self, action: #selector(closeBtnAction), for: .touchUpInside)
        self.addSubview(button)
        
    }
    
    @objc func closeBtnAction() {
        self.isHidden = true
        
    }
  

}
